// mycomponent/Waterfalls_flow.js
const skinBehavior = require("../../../../utils/themeSkin/skinBehavior")
const app = getApp();
Component({
  behaviors: [skinBehavior],
  options:{  
    externalClasses: ['microIndex']
  },
  properties: {
    goodsData: {
      type: null
    }
  },

  lifetimes: {
    attached: function() {
      // 在组件实例进入页面节点树时执行
     this.setData({
        now: (String(Date.parse(new Date())).substring(0, 10)) *1,
      });
    },
  },
  observers:{
    'goodsData': function(goodsData) {
      console.log(goodsData,'goodsData==')
      this.setData({list:goodsData})
    }
  },

  /**
	 * 组件的初始数据
	 */
  data: {
    imgHost: app.globalData.imgPath,
    list:[],
    now:0,
  },

  /**
	 * 组件的方法列表
	 */
  methods: {
    finished(e) {
      // this.getData();
    },  
    onChange(e) {
      let {
        index
      } = e.currentTarget.dataset;
      this.data.list[index].timeData = e.detail;
      this.setData({
        ['list[' + index + '].timeData']: e.detail,
      });
    },
    jumpDetails(e) {
      let id = e.currentTarget.dataset.id;
      wx.navigateTo({
        url: '/mircoApp/local_life/goods/goods?goods_id=' + id
      });
    },
  }
});
